package com.mobimap.nhom9.gui;

import com.mobimap.nhom9.bus.MobimapProvider;
import com.mobimap.nhom9.gui.utls.GuiHelper;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

public class LocalMapProvider implements IMapProvider {

	public Bitmap getTileBitmap(int zoom, int xTile, int yTile) {
		String path = String.format(Container.getInstance()
				.getResourceDirectory() + "/Local/%s_%s_%s.png", zoom, xTile,
				yTile);
		
		Bitmap bitmap = GuiHelper.decodeSampledBitmapFromResource(path,
				Container.TILE_WIDTH, Container.TILE_HEIGHT);
		return bitmap;
	}
	public Bitmap getMarker() {
		Bitmap bitmap = BitmapFactory.decodeResource(MobimapProvider.getContext().getResources(), R.drawable.marker);
		return bitmap;
	}

}
